package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.EmployeeQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    void insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll(EmployeeQueryObject qo);

    int updateByPrimaryKey(Employee record);

    int query4Count(EmployeeQueryObject qo);

    List<Employee> query4List(EmployeeQueryObject qo);

    Employee getByUsername(String username);

    void changeState(Long id);

    void changePassword(Long id);

    void insertRoleRelation(@Param("empId") Long empId, @Param("roleId") Long roleId);

    void deleteRoleRelation(Long empId);

    List<Long> getRoleIdByEmpId(Long employeeId);

    List<Employee> selectlist();

    List<Employee> selectAll();
}